package com.qfmy.webapp.controller.wallpaper;

import com.qfmy.common.result.Result;
import com.qfmy.model.vo.wallpaper.WallpaperCategoryVo;
import com.qfmy.webapp.service.wallpaper.WallpaperCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.qfmy.web.app.controller.wallpaper
 * @date 2025/11/26
 * @description 壁纸分类
 */
@RestController
@SuppressWarnings("all")
@RequestMapping("/app/wallpaperCategory")
public class WallpaperCategoryController {

    /**
     * 注入service
     */
    @Autowired
    private WallpaperCategoryService wallpaperCategoryService;

    /**
     * 根据类型获取壁纸分类
     */
    @RequestMapping("/getWallpaperCategoryNameByType")
    public Result<List<WallpaperCategoryVo>> getWallpaperCategoryNameByType(@RequestParam Integer type) {
        List<WallpaperCategoryVo> list = wallpaperCategoryService.getWallpaperCategoryNameByType(type);
        return Result.ok(list);
    }

}
